/**
 * 
 * @author Hyuksoo Seo
 * created Oct 15, 2008
 * copyright 2008 by hs2393@columbia.edu
 */
package edu.columbia.ubms.ejb;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Table(name="blog")
/*
@SequenceGenerator(name = "mainpage_sequence", sequenceName = "mainpage_id_seq")
@TableGenerator(  name="bmainpage_id", table="primary_keys", pkColumnName="key", pkColumnValue="mainpage",
                valueColumnName="value")
*/                 
public class BlogEntityBean implements Serializable {
     /**
	 * 
	 */
	
	private static final long serialVersionUID = 3L;

	private int blogId;
	private int blogboxId;
	private int userId;
	private String blogName;
	private String blogContent;
	private String blogTag;
	private char blogShare;
	
	public BlogEntityBean() { 
		super();
	};

	public BlogEntityBean(int blogboxId, int userId, String blogName, String blogContent,
			String blogTag, char blogShare) {
		super();
		this.blogboxId = blogboxId;
		this.userId = userId;
		this.blogName = blogName;
		this.blogContent = blogContent;
		this.blogTag = blogTag;
		this.blogShare = blogShare;
	}

	@Override
	public String toString() {

			return "Blog Box : " + getBlogboxId() + " UserId " + getUserId() + " BlogName "
							+ getBlogName() + " BlogContent "
							+ getBlogContent() + " BlogTag " + getBlogTag()
							+ " BlogBoxShare " + getBlogShare();
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public int getBlogId() {
		return blogId;
	}

	public void setBlogId(int blogId) {
		this.blogId = blogId;
	}

	public int getBlogboxId() {
		return blogboxId;
	}

	public void setBlogboxId(int blogboxId) {
		this.blogboxId = blogboxId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getBlogName() {
		return blogName;
	}

	public void setBlogName(String blogName) {
		this.blogName = blogName;
	}

	public String getBlogContent() {
		return blogContent;
	}

	public void setBlogContent(String blogContent) {
		this.blogContent = blogContent;
	}

	public String getBlogTag() {
		return blogTag;
	}

	public void setBlogTag(String blogTag) {
		this.blogTag = blogTag;
	}

	public char getBlogShare() {
		return blogShare;
	}

	public void setBlogShare(char blogShare) {
		this.blogShare = blogShare;
	}
}
